package com.zhoushihao.class0818;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Scanner;

public class Rubbish {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] score = new int[5];
        List<Point> points = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            points.add(new Point(sc.nextInt(), sc.nextInt()));
        }
        for (Point p : points) {
            int count = 0;
            int count_l = 0;
            for (int i = p.x - 1; i <= p.x + 1; i++) {
                for (int j = p.y - 1; j <= p.y + 1; j++) {
                    if (i == p.x || j == p.y) {
                        if (points.contains(new Point(i, j))) {
                            count_l++;
                        }
                    } else {
                        if (points.contains(new Point(i, j))) {
                            count++;
                        }
                    }
                }
            }
            if (count_l == 5) {
                score[count]++;
            }
        }
        for (int i = 0; i < score.length; i++) {
            System.out.println(score[i]);
        }
    }
}

class Point {
    int x, y;

    Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Point point = (Point) o;
        return x == point.x && y == point.y;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y);
    }
}
